package com.shawny.model;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by Shawn Wong on 2017/3/30.
 * Try you best !
 */
public class Player {

    String id;
    AtomicInteger score;
    private boolean ready;

    public Player(String playerId) {
        this.id = playerId;
        this.score = new AtomicInteger();
        this.ready = false;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getScore() {
        return score.get();
    }

    public boolean isReady() {
        return ready;
    }

    public void ready() {
        this.ready = true;
    }

    public void incrementScore() {
        this.score.getAndIncrement();
    }
}
